fix: allow fork PRs to pass validation when commenting fails#15
fix: allow fork PRs to pass validation when commenting fails#15danmoseley merged 1 commit intomainfrom
Conversation
Add continue-on-error to the PR comment step. GITHUB_TOKEN is read-only for fork PRs, so the comment POST returns HTTP 403. Validation results are still reported via job annotations and exit code — the comment is a nice-to-have, not a gate. Fixes #13 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Warnings (4)
|
danmoseley
left a comment
There was a problem hiding this comment.
thanks, don't know why I didn't put PR up
There was a problem hiding this comment.
Pull request overview
This PR adjusts the pr-validation GitHub Actions workflow so fork-based pull requests don’t fail validation solely due to insufficient GITHUB_TOKEN permissions when attempting to post a PR comment.
Changes:
- Marks the “Post or update PR comment” step as
continue-on-error: trueto prevent HTTP 403 comment-post failures from failing the job.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| - name: Post or update PR comment | ||
| if: always() && github.event_name == 'pull_request' && steps.validate.outputs.has_comment == 'true' | ||
| continue-on-error: true # GITHUB_TOKEN is read-only for fork PRs (dotnet/arcade-skills#13) |
There was a problem hiding this comment.
continue-on-error: true will ignore all failures in the comment step, including same-repo PRs where a failure might indicate a real regression (e.g., API shape changes, auth misconfig, rate limiting). If the intent is only to tolerate fork PR permission restrictions, consider making this conditional (e.g., only for fork PRs) so unexpected failures still fail the job in trusted contexts.
| continue-on-error: true # GITHUB_TOKEN is read-only for fork PRs (dotnet/arcade-skills#13) | |
| continue-on-error: ${{ github.event.pull_request.head.repo.fork == true }} # GITHUB_TOKEN is read-only for fork PRs (dotnet/arcade-skills#13) |
Adds
continue-on-error: trueto the PR comment step.GITHUB_TOKENis read-only for fork PRs, causing HTTP 403 on the comment POST. Validation results are still reported via job annotations and exit code.Fixes #13